// 用户类型
export interface User {
  id: number;
  openid: string;
  nickname: string;
  avatar: string;
  created_at: string;
}

// 日记类型
export interface Diary {
  id: number;
  user_id: number;
  title: string;
  content: string;
  tags: string[];
  mood?: number;
  created_at: string;
  updated_at: string;
}

// 日记创建/更新类型
export interface DiaryCreate {
  title: string;
  content: string;
  tags?: string[];
  mood?: number;
}

// AI对话消息类型
export interface ChatMessage {
  id: string;
  role: 'user' | 'assistant';
  content: string;
  timestamp: string;
  related_diaries?: number[];
}

// AI对话会话类型
export interface Conversation {
  id: number;
  user_id: number;
  question: string;
  answer: string;
  related_diaries: number[];
  created_at: string;
}

// AI洞察类型
export interface AIInsight {
  type: 'emotion' | 'topic' | 'growth';
  title: string;
  content: string;
  data?: any;
}

// 统计数据类型
export interface Stats {
  total_diaries: number;
  total_words: number;
  writing_streak: number;
  recent_emotions: number[];
  popular_tags: { tag: string; count: number }[];
}

// API响应类型
export interface ApiResponse<T = any> {
  success: boolean;
  data?: T;
  message?: string;
  error?: string;
}

// 分页类型
export interface Pagination {
  page: number;
  size: number;
  total: number;
  pages: number;
}

// 日记列表响应类型
export interface DiaryListResponse {
  items: Diary[];
  pagination: Pagination;
} 